Skip to content

Fix thread safety in WaitGroup and add static linkage to memsearch#147

Merged
IronsDu merged 1 commit into
masterfrom
fix/waitgroup-thread-safety
May 25, 2026
Merged

Fix thread safety in WaitGroup and add static linkage to memsearch#147
IronsDu merged 1 commit into
masterfrom
fix/waitgroup-thread-safety

Conversation

@IronsDu

@IronsDu IronsDu commented May 25, 2026

Copy link
Copy Markdown
Owner
  • Add mutex locking to WaitGroup::add() and done() for thread safety
  • Only notify when counter reaches zero in done()
  • Return bool from timed wait() to indicate success
  • Change mCounter from atomic to int (now protected by mutex)
  • Add static to memsearch in PromiseReceive for internal linkage

- Add mutex locking to WaitGroup::add() and done() for thread safety
- Only notify when counter reaches zero in done()
- Return bool from timed wait() to indicate success
- Change mCounter from atomic<int> to int (now protected by mutex)
- Add static to memsearch in PromiseReceive for internal linkage

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

clang-tidy review says "All clean, LGTM! 👍"

@IronsDu IronsDu merged commit d7d5100 into master May 25, 2026
7 of 35 checks passed
@IronsDu IronsDu deleted the fix/waitgroup-thread-safety branch May 25, 2026 22:43
@IronsDu

IronsDu commented May 25, 2026

Copy link
Copy Markdown
Owner Author

FIx #146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant